<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets">

<h:head>
	<title>Add Session</title>
</h:head>
<f:view>
	<h:body>
		<ui:composition template="../includes/template.xhtml">
			<ui:define name="mainbody">
				<center>
					<h:form>
						<p:panel header="Add Session" style="min-height: 550px"
							styleClass="prime_panel">
							<p:growl id="growl" showDetail="true" sticky="false"
								autoUpdate="true" showSummary="false" />
							<center>
								<table border="0" cellpadding="4px" cellspacing="8px">
									<tr>
										<td><h:outputText value="Session Title :" /><h:outputText value="*" style="color:red"/></td>
										<td><p:inputText id="sessionTitle"
												value="#{sessionBean.session.sessionTitle}" size="20"  required="true" requiredMessage="Please enter Session Title">
												<f:ajax execute="@this" event="blur" />
												</p:inputText>
										</td>
									</tr>
									<tr>
										<td><h:outputText value="From :" /><h:outputText value="*" style="color:red"/></td>
										<td><p:calendar mode="popup" navigator="true"
												pattern="dd-MM-yyyy" effect="fadeIn" size="20"
												showButtonPanel="true"
												value="#{sessionBean.session.startDate}"
												readOnlyInputText="true" required="true"
												requiredMessage="Please Enter From Date" >
												<f:ajax execute="@this" event="blur" />
												</p:calendar>
										</td>
									</tr>

									<tr>
										<td><h:outputText value="To :" /><h:outputText value="*" style="color:red"/></td>
										<td><p:calendar mode="popup" navigator="true"
												pattern="dd-MM-yyyy" effect="fadeIn" size="20"
												showButtonPanel="true"
												value="#{sessionBean.session.endDate}"
												readOnlyInputText="true" required="true"
												requiredMessage="Please Enter the To Date" >
												<f:ajax execute="@this" event="blur" />
												</p:calendar>
										</td>
									</tr>

									<tr>
										<td><h:outputText value="Description: " /></td>
										<td><p:inputTextarea id="desc" rows="5" cols="20"
												value="#{sessionBean.session.description}" />
										</td>
									</tr>

									<tr>
										<td></td>
										<td style="text-align: right"><p:commandButton
												id="submit" value="Submit" type="submit" ajax="false"
												action="#{sessionBean.performAction}" />
										</td>
									</tr>
								</table>
							</center>
						</p:panel>
					</h:form>
				</center>
			</ui:define>
		</ui:composition>
	</h:body>
</f:view>
</html>
